﻿using System;
using fastCSharp;

namespace diantou.web.enterprise
{
    /// <summary>
    /// 我的私信
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class message : examPermissionView<message>
    {
        /// <summary>
        /// 
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private web.message.userMessage[] messages;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        private bool loadView(int page)
        {
            if (currentUserId != 0)
            {
                diantou.dataAccess.message.messageCount[] values = diantou.dataAccess.tcpCall.message.getCount(currentUser.Id, currentUser.IsChangeVisit, pageInfo.Size = fastCSharp.config.pub.Default.PageSize, pageInfo.Page = page, out pageInfo.Count);
                messages = values.getArray(value => new web.message.userMessage { Count = value.Count, Message = value.Message, IsSelf = value.Message.UserId == currentUserId });
                return true;
            }
            return false;
        }
    }
}
